package cn.java79.springcore.aop;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.Arrays;

/**
 * @author oldliu
 * @since 1.0
 */
public class TestAop {
    public static void main(String[] args) {
        ApplicationContext ac=new ClassPathXmlApplicationContext("aop.xml");
        UserService useService = ac.getBean("useService", UserService.class);
        int r = useService.add(100, "老吴", "11222", "laouw@msn.com");
        System.out.println("增加的结果是："+r);
        System.out.println(">>>>>>>>>>>>>>>>>>>>>>>>");
        System.out.println(useService.getClass().getName());
        System.out.println(useService.getClass().getSuperclass().getName());
        System.out.println("实现的接口："+ Arrays.toString(useService.getClass().getInterfaces()));
    }
}
